perm filename TVFONT.BGB[UP,DOC] blob
sn#208331 filedate 1976-03-29 generic text, type T, neo UTF8
COMMENT ⊗ VALID 00011 PAGES
RECORD PAGE DESCRIPTION
00001 00001
00002 00002 USER PROGRAM DOCUMENTATION SEPTEMBER 1973
00004 00003 INTRODUCTION.
00006 00004 TVFONT PRIMER.
00011 00005 Polygon Killing.
00014 00006 TVFONT COMMAND SUMMARY
00016 00007 TVFONT COMMAND SUMMARY
00018 00008 TVFONT COMMAND SUMMARY
00020 00009 TVFONT'S EXTENDED COMMANDS.
00022 00010 TVFONT'S EXTENDED COMMANDS.
00025 00011 TVFONT NODE FORMATS - JAN 1973.
00028 ENDMK
⊗;
USER PROGRAM DOCUMENTATION SEPTEMBER 1973
draft - draft - draft - draft - draft - draft - draft - draft - draft
TVFONT - Television Font Maker.
Bruce g. Baumgart
Tovar
ABSTRACT:
TVFONT is a program for creating XGP fonts from video
images; and for editing and scaling an existing font.
CONTENTS:
1.0 INTRODUCTION.
2.0 PRIMER.
3.0 COMMAND LETTERS.
4.0 EXTENDED COMMANDS.
5.0 FILE FORMATS.
This research was supported in part by the Advanced Research
Projects Agency of the Office of the Secretary of Defense under
Contract No. SD-183.
The views and conclusions contained in this document are
those of the author and should not be interpreted as necessarily
representing the official policies, either expressed or implied, of
the Advanced Research Project Agency or the United States
Government.
INTRODUCTION.
TVFONT is a version of CRE (January 1973) that was
specialized to the task of converting television images into type
fonts for the XGP, Xerox Graphics Printer. The original idea was to
demonstrate the utility of a polygon representation for scaling,
smoothing and editing typographical glyphs; the resulting hack
(demonstration program) was extended and developed by Tovar Mock
into the program called TVFONT. Accordingly, the main idea of TVFONT
is to convert video rasters into polygons, to edit and scale the
polygons, and to convert the polygons back into bit rasters.
TVFONT PRIMER.
TVFONT is on the system, and can be run by typing "R TVFONT"
at a III display console. At present, III #23 is next to a camera
setup for making fonts. The process of making a new XGP font or
altering an old one will be explained in six steps:
1. Raster input: get a video image or an old font.
2. Contouring: make polygons.
3. Polygon editing: delete, scale, position and alter.
4. Polygon I/O: save and restore polygons.
5. Font output: make new font and output font file.
Complexity arises in that there is more than one way to do
each step, there are default arguments and switchs which the user
may alter, there are ways to save and restore intermediate results,
and there are quite a few different display modes and display
diagonostics. The TVFONT command scanner resembles that of TVED and
E; (as well as CRE and GEOMED); the command scanner types an
asterisk "*" when it is in its top most listen loop waiting for a
single command character. The command character may be modified by
the META and CONTROL keys which will be abbreviated as "α", "β" and
"ε" for CONTROL, META, and META-CONTROL respectively. Many commands
in turn require arguments such as numbers or file names. Finally the
"X" command waits for an extended command name of several
characters, which is called an extended command.
This first explanation will present a way of making a new
font using the fewest commands.
Raster Input and Contouring:
1. "T" take television picture.
2. "H" Display histogram of television picture.
3. "C24" Cut at intensity level 24.
Get the Font Camera looking at a single letter in a font
book. Use a black piece of paper with a square cut out as a mask to
isolate the letter. The "T" command will take a television picture.
The "H" command will display a histogram of the television picture,
showing how many points of the image were 0 intensity, (total black)
and how many points of the image were 77 intensity, (total white). A
picture of a black glyph on a white background surrounded by a black
mask should yield a histogram with two peaks.
Next the "C" command followed by an octal number followed by
a carriage return; contours the image at the given octal intensity
cut threshold. That is all the points of the image above the
threshold are inside of a polygon. The intensity value of the
lowest valley between the two peaks of the histogram is probably the
best cut value (and is probably the octal number 24 or 30). The cut
command, will display the polygons that are made.
Polygon Killing.
4. "ε+" Fetch 1st polygon of 1st image of the film.
5. "K" Kill a polygon.
6. "." ring around the polygons of an image.
7. "!" flush node display.
Given an image of polygons corresponding to one letter,
undesired polygons can be deleted by using the "K" command and the
node link display commands. To start, the "ε+" will intensify the
first polygon of the image's polygon ring; from there the "."
commands will intensify the next polygon of the ring; the "K"
command will delete the presently intensified polygon and fetch the
next polygon.
A font corresponds to a film. An image corresponds to a
letter. After taking a series of iaages, and deleting undesired
polygons a font file can be made using:
Making and Outputing a Font File.
8. "X"CENTER Center all the images of the film.
9. "Q" Make font bit rasters.
10. "εO" Output font file.
The "X"CENTER command is an extend mode command and requires
both hitting "X" and typing out the word "CENTER" followed by a
carriage return. The "Q" will cause a bit raster to be made for the
interior portions of each image of the film; if an image node does
not have an associate ASCII code then the user will be requested to
supply one. The "εO" will ask for a font filename and will output a
font file in the Stanford Format.
Testing a new Font File.
11. .XGP FILE/FONT=NEWFNT.FNT[XGP,BGB]
The above monitor command will print a FILE with a new font.
The user must specify his PPPN because the default is [XGP,SYS].
TVFONT COMMAND SUMMARY
A ASSIGN ASCII CODE TO IMAGE.
B EXPAND/CONTRACT BY CONSTANT
αB EXPAND/CONTRACT IN Y DIRECTION
βB EXPAND/CONTRACT IN X DIRECTION
εB SLANT CHARACTER (1/2 SLANTS TO 45 DEGREE ANGLE)
C MAKE THRESHOLD CUT.
εC MAKE POLYGON IMAGE OUT OF BIT REPRESENTATION OF FONT.
D ENABLE/DISABLE DELETION OF BABY POLYGONS (DEFAULT IS OFF).
F LOCATE NEAREST POINT, εF USE LIGHT PEN
G LEVEL OF CORRESPONDING CHARACTER CODE
H HISTOGRAM, "αH" ,"βH" BI-MODAL CUT.
I INPUT TV PICTURE FROM DISK.
αI INPUT CRE FILE
βI INPUT CRUNCHED FILE
εI INPUT FONT FILE INTO FONT SEGMENT (SEE `READFONT')
K KILL IMAGE, POLYGON OR VERTEX
L SHOW LAST BIT IMAGE
αL SHOW CHARACTER FROM FONT IN FNTSEG
M MOVE POLYGON TO NEXT IMAGE.
αM MOVE TO NEW IMAGE
βM MIDPOINT LINE
εM MUNG ONTO GRID POINT (AS SEEN IN εY)
N NEXT IMAGE
αN PREVIOUS IMAGE
βN REPEAT NEXT IMAGE UNTIL A CHARACTER IS TYPED
εN REPEAT PREVIOUS IMAGE UNTIL A CHARACTER IS TYPED
TVFONT COMMAND SUMMARY
O OUTPUT CAREYE FILE.
αO OUTPUT CRE FILE
εO OUTPUT FONT FILE
P PLOT OUTPUT FILE.
Q MAKE FONT
αQ MAKE 1/2 SIZE FONT
R DISPLAY BIT MATRIX FOR THIS CHARACTER.
αR ROTATE IMAGE, LEVEL OR POLYGON (ANGLE IN RADIANS)
S SMOOTH
αS SMOOTH AND KILL VIDEO INTENSITY CONTOUR
βS REPEAT 'S' FOR EACH IMAGE
εS REPEAT 'αS' FOR EACH IMAGE
T TAKE A TV PICTURE
αT TAKE A TV PICTURE, SETTING CLIP LEVELS AUTOMATICALLY
V CREATE VERTEX AT CENTER
αV CREATE NEW VERTEX AT CURRENT VERTEX
βV CREATE NEW VERTEX IN NEW IMAGE
W CENTER IN THE WINDOW.
αW CENTER Y-POSITION ONLY.
βW CENTER X-POSITION ONLY.
εW MOVE POINT SPECIFIED BY LIGHT PEN TO CENTER.
X XTEND MODE COMMANDS
Y DISPLAY SMOOTHED FORM
βY DISPLAY VIDEO INTENSITY CONTOUR
αY DISPLAY BOTH OF ABOVE
εY DISPLAY VIDEO INTENSITY CONTOUR MUNGED ONTO PIXELS
Z NO-OP
αZ RESET LOGICAL CAMERA POSITION
βZ RESET DISPLAY
TVFONT COMMAND SUMMARY
+ Fetch film node.
α+ Fetch first image node from film.
β+ Fetch first level from film.
ε+ Fetch first polygon from film.
IF A NODE IS CURRENTLY BEING DISPLAYED, THESE COMMANDS AFFECT THAT NODE,
OTHERWISE THEY AFFECT THE CAMERA (VIEWERS) POSITION. <CONTROL> MULTIPLIES
BY 2, <META> MULTIPLIES BY 4.
; MOVE LEFT (←) BY DELTA
: MOVE RIGHT (→) BY DELTA
( MOVE UP BY DELTA
) MOVE DOWN BY DELTA
/ DIVIDE DELTA BY 2
\ MULTIPLY DELTA BY 2
THESE COMMANDS AFFECT THE CAMERA (VIEWERS) POSITION.
* INCREASE MAGNIFICATION BY DELTA
- DECREASE MAGNIFICATION BY DELTA
THESE COMMANDS CHANGE NODE BEING DISPLAYED.
. FETCH COUNTER CLOCKWISE NODE IN RING.
, FETCH CLOCKWISE NODE IN RING.
< FETCH FATHER OF NODE
> FETCH SON OF NODE
≤ FETCH ARC [OF POLYGON OR VERTEX]
→ FETCH POLYGON [OF VERTEX]
∧ EQUIVALENT TO '<,>'
∨ EQUIVALENT TO '<.>'
! FLUSH NODE DISPLAY
THESE COMMANDS AFFECT THE PUSHDOWN LIST
∪ PUSH NODE BEING DISPLAYED ONTO STACK
∩ POP NODE OFF STACK AND DISPLAY IT
↔ SWAP NODE BEING DISPLAYED WITH TOP OF STACK
TVFONT'S EXTENDED COMMANDS.
ARCWID
Set smoothing constant. This is the maximum distance a vertex
may from a arc before it is split into two arcs. See description
of smoothing algorithm on page XX.
BABYKILL
Toggle flag which causes baby polygons (those consisting of only
one pixel) to be killed)
CAMERA
Select a different camera number.
CENTER
Center all images. It is equivalent to the command 'W' applied
to each image and uses the same control bits.
DDT
Invoke DDT if present, return with αP..
DISPLAY
Enable display.
-DISPLAY
Disable display. TVFONT spends a significant amount of time
putting up the display.
EXIT
Exit to moniter.
GRID
Enable display of grid. Grid is some multiple of pixel size,
dependent on camera focal length. It is useful of lining up
characters.
-GRID
Disable display of grid.
HELP
Display help file.
HOLE
Change a polygon into a hole.
KILARC
Kill arcs vectors. This allows several degrees of smoothing to
be tried in conjunction with the ARCWID command.
TVFONT'S EXTENDED COMMANDS.
KILVIC
Kill video intensity contours and replaces them with arcs.
MUNG
Force all vertices of current polygon or level onto pixel boundaries.
This has a permanent effect as opposed to 'εY' command which only
displays them that way.
ORTHMUNG
ORTHMUNG forces vertices which appear to be form right angles onto
pixel boundaries. This is attempt to counter the rounding effect
of dekinking on sharp corners as are generated by reading a font.
POLYGON
Change a hole into a polygon
POPJ
Leave TTY loop. Used for debugging.
READFONT
Convert font which has been read into the font segment into polygonal
representation, displaying each character as read.
SCALE
Scale all images by constant. Equivalent to the command 'B' applied
to each image.
SLANT
Slant all images by constant . Please see command 'εB' for a more
complete description.
SORT
Sort images on film according to ASCII code. This is for convienence
in looking a fonts sequentially. The 'G' command is recommended for
finding specific characters.
XEROX
OUTPUT TV IMAGE TO XGP
XSCALE
Scale all images by constant in the X direction. Equivalent to the
command 'αB' applied to each image.
YSCALE
Scale all images by constant in the Y direction. Equivalent to the
command 'βB' applied to each image.
TVFONT NODE FORMATS - JAN 1973.
________________________________________________________________
| |
| VERTEX/ARC NODE. POLYGON/REGION NODE. |
| |
| 0 VERTEX-RING 0 POLYGON-RING. |
| 1 ROW,,COL 1 DAD,,SON |
| 2 TYPE,,RELOC 2 TYPE,,RELOC |
| 3 - ,, - 3 - ,, - |
| 4 ARC,, - 4 ARC,,NCNT |
| 5 - ,,PGON 5 - ,,PGON |
| 6 RT SEG,,LT SEG 6 - ,, - |
|________________________________________________________________|
| |
| IMAGE NODE. LEVEL NODE. |
| |
| 0 IMAGE-RING 0 LEVEL-RING |
| 1 - ,,SON 1 - ,,SON |
| 2 TYPE,,RELOC 2 TYPE,,RELOC |
| 3 - ,, - 3 - ,, - |
| 4 - ,, - 4 - ,,NCNT |
| 5 - ,, - 5 - ,, - |
| 6 - ,, - 6 - ,, - |
|________________________________________________________________|
| |
| FILM NODE. EMPTY NODE. |
| |
| 0 CORESIZE 0 - ,,AVAIL |
| 1 - ,,SON 1 - ,, - |
| 2 TYPE,,RELOC 2 TYPE,,RELOC |
| 3 - ,,AVAIL 3 - ,, - |
| 4 BLOCK COUNT 4 - ,, - |
| 5 - ,, - 5 - ,, - |
| 6 - ,, - 6 - ,, - |
|________________________________________________________________|
| |
| SEGMENT NODE. |
| 0 SEGMENT RING |
| 1 - ,, - |
| 2 TYPE,,300003 |
| 3 LDEL,,RDEL |
| 4 LCOL,,RCOL |
| 5 LROW,,RROW |
| 6 LT,,RT |
|________________________________________________________________|